package com.xique.door.service.impl;

import com.xique.door.bean.domain.LoginInfo;
import com.xique.door.mapper.LoginInfoMapper;
import com.xique.door.service.ILoginInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author shd
 * @create 2021/11/12 9:41
 */
@Service
public class LoginInfoServiceImpl implements ILoginInfoService {

    @Autowired
    private LoginInfoMapper loginInfoMapper;

    @Override
    public int insertLoginInfo(LoginInfo loginInfo) {
        if (null == loginInfo) {
            return 0;
        }
        loginInfo.setLoginTime(new Date());
        return loginInfoMapper.insert(loginInfo);
    }
}
